package cn.dansj.handler.interfaces;

import cn.dansj.annotation.MarkAsApi;
import cn.dansj.handler.InterfaceHandler;

import java.util.List;
import java.util.Map;

@MarkAsApi
public class EdgeGetEngine extends InterfaceHandler {
    private static final String select = "select id,title,url from x_edge_component where component='engine'";

    @Override
    public Object execute(Map<String, Object> paramsMap) {
        List<Map<String, Object>> maps = jdbcTemplate.queryForList(select);
        maps.forEach(map -> map.put("searchUrl",map.remove("url")));
        return maps;
    }
}